HTTPS: Create a TLS Certificate

We will walk you through the process of creating a TLS certificate in this lesson.

Objective#

  • Migrate our endpoint from HTTP to HTTPS.

Steps#

  • Manually create a TLS certificate.

As things stand, our application is responding to unencrypted HTTP traffic. In the real world, we want to protect any data as it traverses the network. To do that, we must encrypt our traffic and serve it over HTTPS.

We’ll also take this as an opportunity to practice the two-phase change process discussed in Multi-phase deployments to give the chance to anyone using our HTTP endpoint to migrate to HTTPS before we turn off HTTP.

Creating the certificate#

Requesting a certificate is an infrequent operation that requires human intervention for validation (or more automation than makes sense, for a process that happens only once). Therefore, we’re going to create our certificate manually. To start, let’s visit the AWS Certificate Manager (ACM) console and hit Request a certificate. Then, let’s select the public certificate option.

Request a Certificate
Request a Certificate

Next, let’s enter our bare domain (e.g., the-good-parts.com) as well as a wildcard version of the domain (e.g., *.the-good-parts.com). The wildcard will cover our prod and staging subdomains.

Add Domain Names
Add Domain Names

Now, we must validate that we control the domain.

Select Validation Method
Select Validation Method

If you chose DNS validation, you will reach a Validation step that asks you to add a CNAME record to your DNS hosted zone. If you registered your domain through Route 53, you can simply click the Create record in Route 53 button to complete the validation process. Otherwise, you have to add the requested record to your DNS hosting service.

Create CNAME Records
Create CNAME Records

It usually takes a few minutes for the certificate to be validated. Once it is validated, you should see your issued certificate in the ACM console.

Validated Certificate
Validated Certificate

You can also inspect the CNAME record that was added to your hosted zone in Route 53.

Hosted Zone CNAME Record
Hosted Zone CNAME Record

Now, we will add an HTTPS endpoint to our application in the next lesson.

Custom Domains: Map our Domain to Load Balancers
HTTPS: Add an HTTPS Endpoint
Mark as Completed
Report an Issue